`
https://leetcode.cn/problems/find-minimum-in-rotated-sorted-array-ii/
`

/**
 * @param {number[]} nums
 * @return {number}
 */
var findMin = function (nums) {
  let left = -1, right = nums.length - 1
  while (left + 1 < right) {
    const mid = left + Math.floor((right - left) / 2)
    if (nums[mid] === nums[right]) {
      // 无法确定当前的区间时，直接把最后一个数删掉
      right--
    } else if (nums[mid] < nums[right]) {
      right = mid
    } else {
      left = mid
    }
  }
  return nums[right]
};